﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Zsa.Emulation.Config;
namespace Zsa.Emulation.Render
{
    /// <summary>
    /// Device host.
    /// </summary>
    public interface IMachineHost
    {

        #region Methods

        #region Create Hosted Device Methods

        /// <summary>
        /// Gets a nes machine with the default 
        /// settings and no render attached.
        /// </summary>
        /// <returns></returns>
        NesMachineHost CreateMachine();

        /// <summary>
        /// Creates the machine with the specified settings
        /// and no render attached.
        /// </summary>
        /// <param name="settings"></param>
        /// <returns></returns>
        NesMachineHost CreateMachine(NesConfigurationProfile settings);


        /// <summary>
        /// Creates the machine.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="hostControl">The host control.</param>
        /// <param name="hostFlags">The host flags.</param>
        /// <returns></returns>
        NesMachineHost CreateMachine(NesConfigurationProfile settings, Control hostControl,
            MachineHostFlags hostFlags);

        

         #endregion Create Hosted Device Methods

        //#region Swap Render
        // /// <summary>
        // /// Swaps the devices render manager of two devices.
        // /// </summary>
        // /// <param name="hostedDeviceSrc">The device with the render.</param>
        // /// <param name="hostedDeviceDest">The device to receive the render.</param>
        //void SwapDeviceRender(NesMachineHost hostedDeviceSrc,
        //    NesMachineHost hostedDeviceDest);
        //#endregion Swap Render

        //#region Find Hosted Device
        ///// <summary>
        ///// Finds the host item by control
        ///// </summary>
        ///// <param name="control">The control the host item exists on.</param>
        ///// <returns>The hosted nes device item.</returns>
        //NesMachineHost GetItemControl(Control control);

        //#endregion Find Hosted Device

        #endregion Methods


        #region Properties

        /// <summary>
        /// The hosted devices.
        /// </summary>
        IList<NesMachineHost> HostedDevices { get; }

        #endregion Properties

 
    }
}
